package com.ljm.junit;

import java.util.Date;

import org.junit.Test;

import com.ljm.dao.UserDao;
import com.ljm.dao.impl.UserDaoJdbcImpl;
import com.ljm.entity.User;

public class UserDaoTest {
	UserDao userDao = new UserDaoJdbcImpl();

	@Test
	public void testAdd() {
		User user = new User();
		user.setId("13124124");
		user.setUsername("nameasfa");
		user.setPassword("mima12414");
		user.setEmail("10412@ada.com");
		user.setBirthday(new Date());
		user.setNickname("昵称");
		userDao.add(user);
	}

	@Test
	public void testFing1() {
		userDao.find("nameasfa", "mima1241411");
	}

	@Test
	public void testFing2() {
		userDao.find("nameasfa11");
	}
}
